package com.vegetable.modules.mapper.finance;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.vegetable.modules.entity.baseData.InvoiceInfo;
import com.vegetable.modules.entity.baseData.po.InvoiceQueryPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 发票信息 Mapper 接口
 * </p>
 *
 * @author wangruijie
 * @since 2024-04-15
 */
@Mapper
public interface InvoiceInfoMapper extends BaseMapper<InvoiceInfo> {

    int insertInvoiceInfo(InvoiceInfo po);

    IPage<InvoiceInfo> selectInvoiceWithAddressBook(IPage iPage, InvoiceQueryPO po);

    Double selectInvoiceTotalAmountWithAddressBook(InvoiceQueryPO po);
    
    /**
     * 根据ID查询发票详情
     * @param id 发票ID
     * @return 发票信息
     */
    InvoiceInfo selectInvoiceDetailById(@Param("id") Long id);
}